namespace NAsserter
{
    public abstract class BaseChainedExpression<T> : IChainedExpression<T>
    {
        private readonly IArgumentExpressions<T> _parent;
        private readonly T _value;

        protected BaseChainedExpression(IArgumentExpressions<T> parent)
        {
            _parent = parent;
        }

        protected BaseChainedExpression(IArgumentExpressions<T> parent, T value)
        {
            _parent = parent;
            _value = value;
        }

        public IArgumentExpressions<T> Parent
        {
            get { return _parent; }
        }

        public T Value
        {
            get { return _value; }
        }
    }
}